package com.example.service;

import com.example.entity.Household;
import com.example.entity.Staffs;
import com.example.result.CommonResult;
import org.springframework.stereotype.Service;

/**
 * @project: smart-property
 * @description: 登录 service 层
 * @author: cjq
 * @create: 2022-11-14 08:53
 **/
public interface LoginService {
    /**
     * 后台 用户密码 登录
     * @param staffs
     * @return
     */
    CommonResult login(Staffs staffs);

    /**
     * 后台 新用户注册
     * @param staffs
     * @return
     */
    int register(Staffs staffs);

    /**
     * 查询账户是否有重复
     * @param staffNumber
     * @return
     */
    CommonResult listStaffNumber(String staffNumber);

    /**
     * app端账号密码登录
     * @param household
     * @return
     */
    CommonResult appLogin(Household household);

    /**
     * app端用户注册
     * @param household
     * @return
     */
    int appRegister(Household household);

    /**
     * 查询app端账户是否重复
     * @param accountNumber
     * @return
     */
    CommonResult listAccountNumber(String accountNumber);

    /**
     * app端邮箱是否重复
     * @param email
     * @return
     */
    CommonResult listEmail(String email);

    /**
     * app端手机号是否重复
     * @param phone
     * @return
     */
    CommonResult listPhone(String phone);

    /**
     * app端邮箱登录
     * @param household
     * @return
     */
    CommonResult emailLogin(Household household);

    /**
     * app端手机号登录
     * @param household
     * @return
     */
    CommonResult phoneLogin(Household household);

    /**
     * 修改密码
     * @param household
     * @return
     */
    int updatePassword(Household household);
}
